package leetcode.code1189;

import leetcode.IDebug;

public class Solution implements IDebug {

	public int maxNumberOfBalloons(String text) {
		char[] cs = text.toCharArray();
		int[] dics = new int[32];
		for (char c : cs) {
			dics[c - 'a']++;
		}
		int ans = (int) 1e4;
		ans = Math.min(ans, dics[0]);
		ans = Math.min(ans, dics[1]);
		ans = Math.min(ans, dics[13]);
		ans = Math.min(ans, dics[11] >> 1);
		ans = Math.min(ans, dics[14] >> 1);
		return ans;
	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		System.out.println('l' - 'a');
		System.out.println('o' - 'a');
		System.out.println('n' - 'a');

	}

}
